import {createStore} from 'vuex'
import getters from './getters'
import user from "@/store/modules/user";
import {globalStore} from "@/store/modules/global";
import {dataDetails} from "@/store/modules/data_details";
import {teamStore} from "@/store/modules/team_details";

// //因为我把模块拆分了，但是我又不想每次都导入，就通过这个自动导入modules目录下的模块
// const modules = modulesFiles.keys().reduce((modules, modulePath) => {
//     const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
//     const value = modulesFiles(modulePath)
//     modules[moduleName] = value.default
//     return modules
// }, {})

export default createStore({
    state: {},
    mutations: {

    },
    actions: {},
    modules: {
        user,
        globalStore,
        dataDetails,
        teamStore
    },
    getters
})
